package so.ifl.servcie;

import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import so.ifl.vo.TranRecordVo;
import so.ifl.vo.Union1Vo;

/**
 *create by aaron.lu
 *create at 2012-2-2 下午11:54:09
 *<mailto: atyuan.lu@gmail.com>
 **/
@Transactional
public interface TransactionService {

	/**
	 * 查询缴费记录<关联查询>
	 * create by aaron.lu
	 * create at 2012-5-9 上午12:01:54
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 * @return
	 *
	 */
	public List<TranRecordVo> queryTranRecordAllInfo(Map<String, Object> params);
	
	/**
	 * 查询交易记录
	 * create by aaron.lu
	 * create at 2012-2-4 下午3:19:15
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 * @param offset
	 * @param limit
	 * @return
	 *
	 */
	public List<TranRecordVo> queryTranRecord(Map<String, Object> params, int offset, int limit);
	
	/**
	 * 统计交易记录
	 * create by aaron.lu
	 * create at 2012-2-4 下午3:21:02
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 * @return
	 *
	 */
	public int countTranRecord(Map<String, Object> params);
	
	/**
	 * 插入交易记录
	 * create by aaron.lu
	 * create at 2012-2-4 下午3:22:03
	 * <mailto: atyuan.lu@gmail.com>
	 * @param tranRecordVo
	 *
	 */
	public void insertTranRecord(TranRecordVo tranRecordVo);
	
	/**
	 * 交易保存
	 * create by aaron.lu
	 * create at 2012-2-5 上午2:08:15
	 * <mailto: atyuan.lu@gmail.com>
	 * @param tranRecordVo
	 * @throws Exception
	 *
	 */
	public void tran(TranRecordVo tranRecordVo) throws Exception;
	
	/**
	 * 查询交易信息
	 * create by aaron.lu
	 * create at 2012-3-25 下午10:43:18
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 * @return
	 *
	 */
	public List<TranRecordVo> queryTranInfo(Map<String, Object> params, int offset, int limit);
	
	/**
	 * 统计
	 * create by aaron.lu
	 * create at 2012-3-25 下午10:44:01
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 * @return
	 *
	 */
	public int countTranInfo(Map<String, Object> params);
	
	/**
	 * 求和交易信息
	 * create by aaron.lu
	 * create at 2012-3-25 下午10:48:31
	 * <mailto: atyuan.lu@gmail.com>
	 * @param params
	 * @return
	 *
	 */
	public float sumTranInfo(Map<String, Object> params);
	
	/**
	 * 更新交易记录
	 * create by aaron.lu
	 * create at 2012-5-20 上午12:39:33
	 * <mailto: atyuan.lu@gmail.com>
	 * @param tranRecordVo
	 *
	 */
	public void updateTranRecord(TranRecordVo tranRecordVo);
}
